<template>
  <div class="app-container">
    <div v-html="news.content" class="rich-text"></div>
  </div>
</template>

<script>
import {getNews, getNewsOpen} from "@/api/cms/news/news";
  export default {
    name: "NewsDetail",
    data() {
      return {
        id: null,
        news: {}
      };
    },
    created() {
      this.id = this.$route.query.id
      console.log("news  id ： " + this.id)
      this._getNews()
    },
    computed: {
    },
    methods: {

     _getNews(){
       getNewsOpen(this.id).then(response => {
         this.news = response.data;
       });
     }
    }
  };
</script>
<style >
/* 添加一些基本的移动端兼容性CSS */
body {
  font-family: Arial, sans-serif;
}
.rich-text {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}
</style>
